import Vue from 'vue'
import Router from 'vue-router'
// import Home from '@/pages/Home/Home'
const Home = () =>  import('@/pages/Home/Home') 
const Search = () => import('@/components/Search')
const Play = () => import('@/pages/Play/Play')
const Comments = () => import('@/pages/Comments/Comments')
const SongList = () => import('@/pages/SongList/SongList')
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
      meta:{
        keepAlive:true
      }
    },
    {
      path: '/search',
      name: 'Search',
      component: Search,
      meta:{
        keepAlive:true
      }
    },
    {
      path: '/play',
      name: 'Play',
      component: Play,
      meta:{
        keepAlive:false
      }
    },
    {
      path: '/comments',
      name: 'Comments',
      component: Comments,
      meta:{
        keepAlive:false
      }
    },
    {
      path: '/songList',
      name: 'SongList',
      component: SongList,
      meta:{
        keepAlive:false
      }
    },
  ]
})
